/**
 * Licensee: avaj llik
 * License Type: Purchased
 */
package ormsamples;

import org.orm.*;
public class CreateTallerdeSOAData {
	public void createTestData() throws PersistentException {
		PersistentTransaction t = orm.TallerdeSOAPersistentManager.instance().getSession().beginTransaction();
		try {
			orm.DAOFactory lDAOFactory = orm.DAOFactory.getDAOFactory();
			orm.dao.Tcp_publicacionDAO lormTcp_publicacionDAO = lDAOFactory.getTcp_publicacionDAO();
			orm.Tcp_publicacion lormTcp_publicacion = lormTcp_publicacionDAO.createTcp_publicacion();
			// TODO Initialize the properties of the persistent object here, the following properties must be initialized before saving : pub_id_persona
			lormTcp_publicacionDAO.save(lormTcp_publicacion);
			orm.dao.Tcp_personaDAO lormTcp_personaDAO = lDAOFactory.getTcp_personaDAO();
			orm.Tcp_persona lormTcp_persona = lormTcp_personaDAO.createTcp_persona();
			// TODO Initialize the properties of the persistent object here, the following properties must be initialized before saving : Tcp_publicacion, sexo
			lormTcp_personaDAO.save(lormTcp_persona);
			t.commit();
		}
		catch (Exception e) {
			t.rollback();
		}
		
	}
	
	public static void main(String[] args) {
		try {
			CreateTallerdeSOAData createTallerdeSOAData = new CreateTallerdeSOAData();
			try {
				createTallerdeSOAData.createTestData();
			}
			finally {
				orm.TallerdeSOAPersistentManager.instance().disposePersistentManager();
			}
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}
}
